﻿namespace System.Collections.Generic
{
    [NonScript]
    public abstract class EqualityComparer<T> : IEqualityComparer<T>, IEqualityComparer
    {
        public static EqualityComparer<T> Default
        {
            get { return new DefaultComparer<T>(); }
        }

        public abstract bool Equals(T x, T y);
        public abstract int GetHashCode(T obj);

        bool IEqualityComparer.Equals(object x, object y)
        {
            return false;
        }

        int IEqualityComparer.GetHashCode(object obj)
        {
            return 0;
        }
    }
}
